package com.client.login.mobile.action;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;

import com.client.base.BaseAction;
import com.client.base.BaseForm;
import com.client.base.ClientUtils;
@Controller("/loginAction")
public class LoginAction extends BaseAction{

	@Override
	public String process(BaseForm reqForm, HttpServletRequest request,
			HttpServletResponse response) throws IOException, ServletException {
		PrintWriter out = null;
		try {
			response.setContentType("text/json;charset=UTF-8");
			out= response.getWriter();
		} catch (IOException e) {
			e.printStackTrace();
		}finally{
			out.print(ClientUtils.getResponseBody(ClientUtils.loginurl, new String[]{ClientUtils.requestDataName,request.getParameter(ClientUtils.requestDataName)}));
			out.flush();
			out.close();
		}
		return null;
	}
	
}
